import request from "@/api";
import { PageRet } from "@/api/response";

class DeptApi {
  /**
   * 查询
   * @param data
   * @returns
   */
  static async query(data): Promise<PageRet<DeptList>> {
    return await request({
      url: "sysDept/index",
      method: "post",
      data: data,
    });
  }
}

export default DeptApi;

export interface DeptList {
  id: string;
  parentId: string;
  name: string;
}

export interface DeptForm {
  id?: string;
  parentId?: string;
  name: string;
}
